home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / CoolMacStacks.sea / Cool Mac Stacks / Information Enhancement / Recipes 2.1 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1991-12-17  |  10KB  |  48 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1</name>
  5.     <id>-1</id>
  6.     <cardCount>27</cardCount>
  7.     <cardID>5134</cardID>
  8.     <listID>4112</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>480</width>
  14.         <height>320</height>
  15.     </cardSize>
  16.     <script>--------------------     Recipes 2.1  -------------------------------                  A HyperCard Stack by                         ----                    David L. Drucker                           ----                   September 18,1991                           ----------------------------------------------------------------------- Handlers in Recipes 2.1:-- on openStack-- on setUpRecipesMenu-- on closeStack-- on doMenu menuItem-- on doImport-- on doSort-- on goShoppingList-- on on doExport-- on showIndex-- on doPrint-- on selectLine lineNumber, fldName-- on doSearch-- on showFindson openStackget the versionif it < 2.0 thenput "Sorry, this stack only works with version 2.0 or above.go homeexit openStackend ifhide cd fld index of cd "Cover cd"push this cdput (the number of cds - 2)into cd fld "Number of Recipes" of cd "Cover cd"SetUpRecipesMenupass openStackend openStackon setUpRecipesMenuif "Recipes" is not in the menus thencreate Menu "Recipes"put  "Shopping List,Sort Recipes,Import Recipe...,Export Recipe...,-,Show Index,Print This Recipe,New Search...,Show Find List" into menu "Recipes"set the commandChar of menuItem 1 of menu "Recipes" to "L"set the commandChar of menuItem 6 of menu "Recipes" to "S"put "goShoppingList,doSort,doImport,doExport,,showIndex,doPrint,doSearch,showFinds" into MyMessagesrepeat with i = 1 to the number of items in MyMessagesset the menuMessage of menuItem i of menu "Recipes" to item i of MyMessagesend repeatend ifend setUpRecipesMenuon closeStackreset menuBarget the freesize of this stackif it > 1000 thenset numberformat to 0.0answer "Compact this stack to save" && (it / 1000) && "K ?" ¬¨with "Not Now" or "OK"if it is "OK" thendoMenu "Compact Stack"end ifif it is "Not Now" then exit closeStackend ifpass closeStackend closeStackon doMenu menuItemif menuItem ="New Card" thenlock Screengo to last cd of bg "Recipe Cd"send the params to HyperCardunlock Screenexit doMenuend ifpass doMenuend doMenuon doImportif the short name of this bg ‚↠"Recipe cd" then exit doImportanswer "Move Plain Text Recipe into Stack?" with "OK" or "Cancel"if it = "Cancel" then exit doImportif it = "OK" thenanswer file "Plain text file to import:" of type "TEXT"put it into theFileif theFile is not "" thenopen file theFileread from file theFile for 16000put it into bg fld "Ingredients"close file theFileend ifend ifend doImporton doSortset the cursor to watchshow cd fld progressPad of cd "cover cd"push this cardgo cd "cover cd"lock screenput "zzz" into fld 1 of cd "Shopping List"sort by fld "Name"put "" into fld 1 of cd "Shopping List"global cardnumput the short name of this bg into thisBackput "" into cd fld "index" of cd "cover cd"put the rect of cd btn bar into myRectput the number of cds in bg "Recipe cd" into totalrepeat with i = 1 to the number of cds in bg "Recipe cd"put i into fld "cd number" of cd i of bg "Recipe cd"put fld "Name" of cd i of bg "Recipe cd" into indexEntryif last character of indexEntry = return then delete last character of indexEntryput indexEntry & return after cd fld "index" of cd "cover cd"colorRectProgress myRect,i,total,bend repeatif last char of cd fld "index" of cd "cover cd" = return then delete last char of cd fld "index" of cd "cover cd"put the number of cds into numOfRecipessubtract 2 from numOfRecipesput numOfRecipes into cd fld "Number of Recipes" of cd "Cover cd"hide cd fld progressPad of cd "cover cd"unlock screenpop carddoMenu "Compact Stack"end doSorton goShoppingListpush this cardvisual effect scroll downgo cd "shopping list"end goShoppingListon doExportif the short name of this bg ‚↠"Recipe cd" then exit doExportask file "Name of text file to create:" with field "Name"if it is empty then exit doExportput it into exportFileopen file exportFilewrite fld "Ingredients" to file exportFileclose file exportFileend doExporton showIndexif the name of menuItem 6 of menu "Recipes" is "Show Index" thengo cd "Cover cd"show cd fld index of cd "Cover cd"put "Hide Index" into menuItem 6 of menu "Recipes"set the menuMessage of menuItem 6 of menu "Recipes" to showIndexset the commandChar of menuItem 6 of menu "Recipes" to "S"exit showIndexelsehide cd fld index of cd "Cover cd"put "Show Index" into  menuItem 6 of menu "Recipes"set the menuMessage of menuItem 6 of menu "Recipes" to showIndexset the commandChar of menuItem 6 of menu "Recipes" to "S"exit showIndexend ifend showIndexon doPrintopen report printing with template "A Recipe"print this cardclose printingend doPrinton selectLine lineNumber, fldNameif lineNumber = empty OR fldName = empty then exit selectLinedo ("put line lineNumber of" && fldName && "into chosenLine")if chosenLine is not empty thendo ("put (number of chars of line 1 to lineNumber of" && fldName & ¬¨") + 1 into endChar")do ("select char (endChar - length (chosenLine)) to endChar of" && ¬¨fldName)end ifend selectLineon doSearchgo cd "cover cd"push this cdask "What would you like to search for?"if it is Empty then exit doSearchhide cd fld "index"put "Show Index" into  menuItem 6 of menu "Recipes"set the menuMessage of menuItem 6 of menu "Recipes" to showIndexset the commandChar of menuItem 6 of menu "Recipes" to "S"set cursor to watchshow cd fld progressPadlock screenshow cd fld SearchFieldput "" into cd fld SearchFieldput "" into cd fld SearchIDput it into findStringput "Results of search for" && findstring  & return & return & return¬¨into cd fld SearchFieldput the rect of cd btn bar into myRectgo cd 1 of bg "Recipe cd"put 0 into numOfHitsput the number of cards in bg "Recipe cd" into totalrepeat foreverfind findstringif the result is "not found" thenexit repeathide cd fld progressPad of cd "cover cd"go "cd cover cd"unlock screenexit doSearchend ifif the short name of this bg is not "Recipe cd" thenexit repeatpop cdend ifput the ID of this cd into CardIDput fld "Name" into RecipeNameif CardID & return is in cd fld searchId of cd "Cover cd" thenexit repeatpop cdend ifput RecipeName & return after cd fld searchfield of cd "Cover cd"put CardID & return after cd fld searchId of cd "Cover cd"add 1 to numOfHitsput the number of this cd into whereFoundcolorRectProgress myRect,whereFound,total,bgo next cdend repeatput numOfHits && "Found:" into line 2 of cd fld searchField of cd "Cover cd"hide cd fld progressPad of cd "cover cd"hide cd btn Fieldmask of cd "cover cd"show cd btn "Hide Search Results" of cd "cover cd"unlock screenend doSearchon showFindslock screengo cd "cover cd"show cd fld searchFieldhide cd btn FieldMaskshow cd btn "Hide Search Results"unlock Screen with visual iris openend showFinds</script>
  17.     <background id="2116" file="background_2116.xml" name="Shopping bg" />
  18.     <background id="2804" file="background_2804.xml" name="Recipe cd" />
  19.     <background id="4802" file="background_4802.xml" name="Cover cd" />
  20.     <card id="5134" file="card_5134.xml" marked="false" name="Cover cd" owner="4802" />
  21.     <card id="7692" file="card_7692.xml" marked="false" name="cd id 7692" owner="2804" />
  22.     <card id="16092" file="card_16092.xml" marked="false" name="cd id 16092" owner="2804" />
  23.     <card id="13425" file="card_13425.xml" marked="false" name="cd id 13425" owner="2804" />
  24.     <card id="15610" file="card_15610.xml" marked="false" name="cd id 15610" owner="2804" />
  25.     <card id="19150" file="card_19150.xml" marked="false" name="cd id 19150" owner="2804" />
  26.     <card id="14132" file="card_14132.xml" marked="false" name="cd id 14132" owner="2804" />
  27.     <card id="39103" file="card_39103.xml" marked="false" name="" owner="2804" />
  28.     <card id="39632" file="card_39632.xml" marked="false" name="" owner="2804" />
  29.     <card id="5596" file="card_5596.xml" marked="false" name="cd id 5596" owner="2804" />
  30.     <card id="25019" file="card_25019.xml" marked="false" name="cd id 25019" owner="2804" />
  31.     <card id="21782" file="card_21782.xml" marked="false" name="cd id 21782" owner="2804" />
  32.     <card id="3153" file="card_3153.xml" marked="false" name="cd id 3153" owner="2804" />
  33.     <card id="32328" file="card_32328.xml" marked="false" name="cd id 32328" owner="2804" />
  34.     <card id="32773" file="card_32773.xml" marked="false" name="cd id 32773" owner="2804" />
  35.     <card id="21295" file="card_21295.xml" marked="false" name="cd id 21295" owner="2804" />
  36.     <card id="10818" file="card_10818.xml" marked="false" name="cd id 10818" owner="2804" />
  37.     <card id="42849" file="card_42849.xml" marked="false" name="" owner="2804" />
  38.     <card id="34616" file="card_34616.xml" marked="false" name="cd id 34616" owner="2804" />
  39.     <card id="35009" file="card_35009.xml" marked="false" name="cd id 35009" owner="2804" />
  40.     <card id="12307" file="card_12307.xml" marked="false" name="cd id 12307" owner="2804" />
  41.     <card id="24803" file="card_24803.xml" marked="false" name="cd id 24803" owner="2804" />
  42.     <card id="18593" file="card_18593.xml" marked="false" name="cd id 18593" owner="2804" />
  43.     <card id="16778" file="card_16778.xml" marked="false" name="cd id 16778" owner="2804" />
  44.     <card id="20796" file="card_20796.xml" marked="false" name="cd id 20796" owner="2804" />
  45.     <card id="39726" file="card_39726.xml" marked="false" name="" owner="2804" />
  46.     <card id="3765" file="card_3765.xml" marked="false" name="Shopping List" owner="2116" />
  47. </stack>
  48.